/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.toto.observable;

import java.awt.FlowLayout;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.WindowConstants;

/**
 *
 * @author Administrator
 */
public class Application extends JFrame
{
    Application()
    {
        InputTextSubject textSubject = new InputTextSubject();
        ShowWord observerOne = new ShowWord(textSubject);
        ShowDigit observerTwo = new ShowDigit(textSubject);
        setLayout(new FlowLayout());
        add(new JScrollPane(textSubject.getTextArea()));
        add(observerOne);
        add(observerTwo);
        setBounds(20, 20, 400, 300);
        setVisible(true);
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    }
    public static void main(String[] args)
    {
        new Application();
    }
}
